## DESCRIPTION
## Vector Calculus: graph of a 3D vector field
## ENDDESCRIPTION

## KEYWORDS('vector calculus', 'vector field graph 3D')

## DBsubject('WeBWorK')
## DBchapter('WeBWorK Tutorial')
## DBsection('Fort Lewis Tutorial 2011')
## Date('01/30/2011')
## Author('Paul Pearson')
## Institution('Fort Lewis College')
## TitleText1('')
## EditionText1('')
## AuthorText1('')
## Section1('')
## Problem1('')


##############################
#  Initialization

DOCUMENT();

loadMacros(
"PGstandard.pl",
"MathObjects.pl",
"parserVectorUtils.pl",
"PGcourse.pl",
"LiveGraphicsVectorField3D.pl",
);

TEXT(beginproblem());


#############################
#  Setup

Context("Numeric");

Context()->variables->are(x=>"Real",y=>"Real",z=>"Real");

$plot = VectorField3D(
Fx => Formula("x"),
Fy => Formula("y"),
Fz => Formula("z"),
xvar => 'x',
yvar => 'y',
zvar => 'z',
xmin => -1,
xmax =>  1,
ymin => -1,
ymax =>  1,
zmin => -1,
zmax =>  1,
xsamples => 4,
ysamples => 4,
zsamples => 4,
axesframed => 1,
xaxislabel => "X",
yaxislabel => "Y",
zaxislabel => "Z",
vectorcolor => "RGBColor[0.0,0.0,1.0]",
vectorscale => 0.2,
vectorthickness => 0.01,
outputtype => 4,
);


#############################
#  Main text

Context()->texStrings;
BEGIN_TEXT
$BCENTER
\{ 
Live3Ddata(
$plot,
image => "exploding-vector-field.png", 
size => [400,400],
tex_size => 600,
tex_center => 1,
scale => 1.25,
);
\}
$ECENTER
END_TEXT
Context()->normalStrings;


############################
#  Answers

$showPartialCorrectAnswers = 1;


############################
#  Solution

Context()->texStrings;
BEGIN_SOLUTION
${PAR}SOLUTION:${PAR}
Solution explanation goes here.
END_SOLUTION
Context()->normalStrings;

COMMENT("MathObject version.");

ENDDOCUMENT();

